﻿@model KL.Store.Web.Models.ProductEditModel
@using KL.Store.Core;
@using CaptchaMvc.HtmlHelpers;
@{
    Layout = null;
}
<h3>Ürün Bilgileri</h3>
<hr />
@using (Ajax.BeginForm(null, null, null, new AjaxOptions { HttpMethod = "Post" }, new { id = "productedit", name = "productedit", @class = "form-horizontal editform" }))
{
    @Html.HiddenFor(model => model.ProductId);
    <div class="form-group">
        <label for="Name" class="col-xs-2 control-label first">Ürün Adı <span class="requireStar">*</span> : </label>
        <div class="col-xs-10">
            @Html.TextBoxFor(model => model.ProductName, new { @class = "form-control", @placeHolder = "Ürünün adını giriniz" })
            @Html.ValidationMessageFor(model => model.ProductName)
        </div>
    </div>
    <div class="form-group">
        <label for="Name" class="col-xs-2 control-label first">Açıklama : </label>
        <div class="col-xs-10">
            @Html.TextBoxFor(model => model.ProductName2, new { @class = "form-control", @placeHolder = "Ürünün açıklaması giriniz" })
            @Html.ValidationMessageFor(model => model.ProductName2)
        </div>
    </div>
    <div class="form-group">
        <label for="Description" class="col-xs-2 control-label first">Ürün Detayı: </label>
        <div class="col-xs-10">
            @Html.TextAreaFor(model => model.Description, new { @class = "form-control ckeditor", @placeHolder = "Ürünün açıklamasını giriniz" })
            @Html.ValidationMessageFor(model => model.Description)
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-3 first">
            <label for="UstUrunId" class="control-label">Üst Ürün ID'si: </label>
            @Html.TextBoxFor(model => model.UstUrunId, new { @class = "form-control", @placeHolder = "Üst Ürün ID'sini giriniz" })
            @Html.ValidationMessageFor(model => model.UstUrunId)
        </div>
        <div class="col-xs-3 first">
            <label for="Price" class="control-label">Fiyatı<span class="requireStar">*</span> : </label>
            @Html.TextBoxFor(model => model.Price, new { @class = "form-control", @placeHolder = "Ürünün fiyatını giriniz" })
            @Html.ValidationMessageFor(model => model.Price)
        </div>
        <div class="col-xs-3 first">
            <label for="TaxRate" class="control-label">KDV Oranı<span class="requireStar">*</span> : </label>
            @Html.TextBoxFor(model => model.TaxRate, new { @class = "form-control", @placeHolder = "KDV oranını giriniz" })
            @Html.ValidationMessageFor(model => model.TaxRate)
        </div>
        <div class="col-xs-3 first">
            <label for="GiftString" class="control-label">Hediye Metni: </label>
            @Html.TextBoxFor(model => model.GiftString, new { @class = "form-control", @placeHolder = "Hediye metnini giriniz" })
            @Html.ValidationMessageFor(model => model.GiftString)
        </div>
    </div>
    <hr />
    <h5>Seçenekler</h5>
    <div class="form-group">
        <div class="col-xs-2 first">
            <div class="checkbox">
                <label>
                    @Html.CheckBoxFor(model => model.IsActive)
                    Aktif
                </label>
            </div>
        </div>
        <div class="col-xs-2 first">
            <div class="checkbox">
                <label>
                    @Html.CheckBoxFor(model => model.NewProduct)
                    Yeni Ürün
                </label>
            </div>
        </div>
        <div class="col-xs-2">
            <div class="checkbox first">
                <label>
                    @Html.CheckBoxFor(model => model.OpportunityProduct)
                    Fırsat Ürünü
                </label>
            </div>
        </div>
        <div class="col-xs-2">
            <div class="checkbox first">
                <label>
                    @Html.CheckBoxFor(model => model.FastCargo)
                    Hızlı Kargo
                </label>
            </div>
        </div>
        <div class="col-xs-2 first">
            <div class="checkbox">
                <label>
                    @Html.CheckBoxFor(model => model.FreeCargo)
                    Ücretsiz Kargo
                </label>
            </div>
        </div>
        <div class="col-xs-2 first">
            <div class="checkbox">
                <label>
                    @Html.CheckBoxFor(model => model.CheckStock)
                    Stok Tut
                </label>
            </div>
        </div>
    </div>
    <hr />
    <h5>İndirim</h5>
    <div class="form-group">
        <div class="col-xs-4 first">
            <label for="DiscountTotal" class="control-label">İndirim Miktarı: </label>
            @Html.TextBoxFor(model => model.DiscountTotal, new { @class = "form-control", @placeHolder = "İndirim miktarını giriniz" })
            @Html.ValidationMessageFor(model => model.DiscountTotal)
        </div>
        <div class="col-xs-4 first">
            <label for="DiscountPercent" class="control-label">İndirim Yüzdesi: </label>
            @Html.TextBoxFor(model => model.DiscountPercent, new { @class = "form-control", @placeHolder = "İndirim yüzdesini giriniz" })
            @Html.ValidationMessageFor(model => model.DiscountPercent)
        </div>
        <div class="col-xs-4 first">
            <label for="DiscountDisplayTotal" class="control-label">İndirim Gösterimi: </label>
            @Html.TextBoxFor(model => model.DiscountDisplayTotal, new { @class = "form-control", @placeHolder = "İndirim gösterimi giriniz" })
            @Html.ValidationMessageFor(model => model.DiscountDisplayTotal)
        </div>
    </div>
    <hr />
    <h5>Nakliye</h5>
    <div class="form-group">
        <div class="col-xs-12 col-md-6 first last">
            <div class="col-xs-3 first">
                <label for="Desi" class="control-label">Desi <span class="requireStar">*</span> : </label>
                @Html.TextBoxFor(model => model.Desi, new { @class = "form-control", @placeHolder = "Desi giriniz" })
                @Html.ValidationMessageFor(model => model.Desi)
            </div>
            <div class="col-xs-3 first">
                <label for="Weight" class="control-label">Ağırlık: </label>
                @Html.TextBoxFor(model => model.Weight, new { @class = "form-control", @placeHolder = "Ağırlık giriniz" })
                @Html.ValidationMessageFor(model => model.Weight)
            </div>
            <div class="col-xs-3 first">
                <label for="CargoPrice" class="control-label">Kargo Ücreti: </label>
                @Html.TextBoxFor(model => model.CargoPrice, new { @class = "form-control", @placeHolder = "Kargo ücretini giriniz" })
                @Html.ValidationMessageFor(model => model.CargoPrice)
            </div>
            <div class="col-xs-3 first">
                <label for="CargoPriceAddition" class="control-label">Ek Kargo Ücreti: </label>
                @Html.TextBoxFor(model => model.AddtCargoPrice, new { @class = "form-control", @placeHolder = "Ek Kargo ücretini giriniz" })
                @Html.ValidationMessageFor(model => model.AddtCargoPrice)
            </div>
        </div>
        <div class="col-xs-12 col-md-6 first last">
            <div class="col-xs-3 first">
                <div class="checkbox">
                    <label>
                        @Html.CheckBoxFor(model => model.FreeCargoInCity)
                        Şehiriçi Ücretsiz Kargo
                    </label>
                </div>
            </div>
            <div class="col-xs-3 first">
                <div class="checkbox">
                    <label>
                        @Html.CheckBoxFor(model => model.FreeInstallmentInCity)
                        Şehiriçi Ücretsiz Kurulum
                    </label>
                </div>
            </div>
            <div class="col-xs-3 first">
                <div class="checkbox">
                    <label>
                        @Html.CheckBoxFor(model => model.InstallmentNeeded)
                        Kurulum Gerekli
                    </label>
                </div>
            </div>
            <div class="col-xs-3 first">
                <label for="InstallmentPrice" class="control-label">Kurulum Ücreti: </label>
                @Html.TextBoxFor(model => model.InstallmentPrice, new { @class = "form-control", @placeHolder = "Kurulum ücreti" })
                @Html.ValidationMessageFor(model => model.InstallmentPrice)
            </div>
        </div>
    </div>
    <hr />
    <div class="form-group">
        <div class="col-xs-6 first">
            <h5>Teslimat</h5>
            <div class="col-xs-6 first">
                <label for="DeliveryTime" class="control-label">Teslim Süresi: </label>
                @Html.TextBoxFor(model => model.DeliveryTime, new { @class = "form-control", @placeHolder = "Teslim süresini giriniz" })
                @Html.ValidationMessageFor(model => model.DeliveryTime)
            </div>
            <div class="col-xs-6 first">
                <label for="DeliveryPeriod" class="control-label">Teslim Periyodu: </label>
                @{var Deliveryperiods = new List<SelectListItem> {
                new SelectListItem {Text = "Saat", Value = "Saat"},
                new SelectListItem {Text = "Gün", Value = "Gün"},
                new SelectListItem {Text = "Hafta", Value = "Hafta"},
                new SelectListItem {Text = "Ay", Value = "Ay"}
            };
                }
                @Html.DropDownListFor(model => model.DeliveryPeriod, Deliveryperiods, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.DeliveryPeriod)
            </div>
        </div>
        <div class="col-xs-6">
            <h5>Garanti</h5>
            <div class="col-xs-6 first">
                <label for="VarrantyTime" class="control-label">Garanti Süresi: </label>
                @Html.TextBoxFor(model => model.VarrantyTime, new { @class = "form-control", @placeHolder = "Garanti süresini giriniz" })
                @Html.ValidationMessageFor(model => model.VarrantyTime)
            </div>
            <div class="col-xs-6 first">
                <label for="VarrantyPeriod" class="control-label">Garanti Periyodu: </label>
                @{var VarrantyPeriods = new List<SelectListItem> {
                new SelectListItem {Text = "Ay", Value = "Ay"},
                new SelectListItem {Text = "Yıl", Value = "Yıl"}
            };
                }
                @Html.DropDownListFor(model => model.VarrantyPeriod, VarrantyPeriods, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.VarrantyPeriod)
            </div>
        </div>
    </div>  
    <hr />
    <div class="form-group">
        <div class="col-xs-12">
            @Html.ValidationSummary(true, "Form gönderilemedi. Lütfen eksik bilgileri kontrol ediniz.")
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-12 first alignright">
            <a class="btn btn-custom1" id="closeForm">Kapat</a>
            <input type="submit" class="btn btn-custom1" value="Gönder" />
        </div>
    </div>
}